package cafe.adriel.androidaudiorecorder.model;
import ohos.media.recorder.Recorder;

/**
 * ex.
 *
 * @author lj
 * @since 2021-04-06
 */
public enum AudioSource {
    /**
     * MIC
     */
    MIC,
    /**
     * CAMCORDER
     */
    CAMCORDER;
    /**
     * 获取资源
     *
     * @return 获取资源id getSource
     */
    public int getSource() {
        switch (this) {
            case CAMCORDER:
                return Recorder.AudioSource.CAMCORDER;
            default:
                return Recorder.AudioSource.MIC;
        }
    }
}